<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!-- 第二种分页方式 -->
	<div>
		<!-- 判断是否有上一页 -->
		<c:if test="${pageInfo.pageNum>1}">
			<a class="sel_btn"
				href="javascript:searchData(${pageInfo.prePage==0?1:pageInfo.prePage})">上一页</a>
		</c:if>
		<!-- 遍历导航页码 -->
		<c:forEach var="page" items="${pageInfo.navigatepageNums}">
			<c:if test="${pageInfo.pageNum==page }">
				<a class="sel_btn ch_cls" href="javascript:searchData(${page})">${page }</a>
			</c:if>
			<c:if test="${pageInfo.pageNum!=page }">
				<a class="sel_btn" href="javascript:searchData(${page})">${page }</a>
			</c:if>
		</c:forEach>

		<!-- 判断是否有下一页 -->
		<c:if test="${pageInfo.pageNum!=pageInfo.pages && pageInfo.pages>0}">
			<a class="sel_btn"
				href="javascript:searchData(${pageInfo.nextPage==0?pageInfo.pages:pageInfo.nextPage})">下一页</a>
		</c:if>
	</div>

<style>
/*a超链接 普通按钮效果*/
.sel_btn {
	height: 21px;
	line-height: 21px;
	padding: 0 11px;
	background: #02bafa;
	border: 1px #26bbdb solid;
	border-radius: 3px;
	/*color: #fff;*/
	display: inline-block;
	text-decoration: none;
	font-size: 12px;
	outline: none;
}
/*a 超链接 按钮背景色改变*/
.ch_cls {
	background: #e4e4e4;
}
</style>	
	